home *** CD-ROM | disk | FTP | other *** search
- Path: hobbes.cc.uga.edu!pollux!greear
- From: greear@pollux.cs.uga.edu (Ben Greear)
- Newsgroups: comp.lang.c
- Subject: Re: Passing by reference and Returning structures
- Date: 11 Mar 1996 17:24:28 GMT
- Organization: University of Georgia, Athens
- Message-ID: <4i1nkc$ov9@hobbes.cc.uga.edu>
- References: <4hvc3b$avn@news2.acs.oakland.edu>
- NNTP-Posting-Host: pollux.cs.uga.edu
-
- In article <4hvc3b$avn@news2.acs.oakland.edu>,
- Monument <jggoslin@vela.acs.oakland.edu> wrote:
- >
- >My question is, what does the return for a structure look like. I
- >would assume the function prototype would look something like:
- >
- >my_struct my_function(int matrix[])
-
- try my_struct& my_function(int matrix[]);
- ^ being the important part
-
- >
- >and the call would be something like
- >
- >structure=my_function(matrix)
- >
- >where my_struct is the structure type and matrix is the variable size
- >matrix. However, when I tried just such a setup it didn't work, gave
-
-
- Ben Greear | "More weight." -- The Crucible
- greear@pollux.cs.uga.edu | "Son, you got a panty on yer head."
- Junior at UGA --Raising Arizona
-
-
-
-
-